package com.designed.pattern.addition.strategyfactoryDecorate;

/**
 * @author yifei
 * @description
 * @date 2024/1/3
 **/
public class Test {
    public static void main(String[] args) {
        CashContext cashContext = new CashContext(5);
        double result = cashContext.getResult(50d, 12);

        CashContext cashContext2 = new CashContext(6);
        double result2 = cashContext2.getResult(50d, 12);

        System.out.println("先满减，在打折：" + result + "\n先打折，在满减：" + result2);

        CashContext cashContext3 = new CashContext(2);
        double result3 = cashContext3.getResult(50d, 12);
        System.out.println(result3);

    }
}
